package cn.jieruoda.eb.system.domain.entity;

import java.io.Serializable;
import java.util.Date;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

import lombok.Data;

/**
 * 后台管理员表
 */
@Data
@Entity
@Table(name = "system_admin")
public class SystemAdmin implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 后台管理员表ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    
    /**
     * 后台管理员账号
     */
    @Column(name = "username", nullable = false, length = 64)
    private String username;
    
    /**
     * 后台管理员密码
     */
    @Column(name = "password", nullable = false, length = 64)
    private String password;
    
    /**
     * 后台管理员姓名
     */
    @Column(name = "real_name", nullable = false, length = 64)
    private String realName;
    
    /**
     * 后台管理员权限(menus_id)
     */
    @Column(name = "roles", nullable = false, length = 255)
    private String roles;
    
    /**
     * 后台管理员最后一次登录ip
     */
    @Column(name = "last_ip", length = 40)
    private String lastIp;
    
    /**
     * 后台管理员最后一次登录时间
     */
    @Column(name = "last_time")
    private Date lastTime;
    
    /**
     * 后台管理员添加时间
     */
    @Column(name = "create_time")
    private Date createTime;
    
    /**
     * 后台管理员级别
     */
    @Column(name = "level", nullable = false)
    private Integer level;
    
    /**
     * 后台管理员状态 1有效0无效
     */
    @Column(name = "status", nullable = false)
    private Integer status;

    /**
     * 手机号码
     */
    @Column(name = "phone", length = 20)
    private String phone;
    
    /**
     * 是否接收短信
     */
    @Column(name = "enable_sms")
    private Boolean enableSms;
} 